package objectDemo;

public class Demo {
	public static void main(String[] args){
		Foo foo = new Foo();
		System.out.println(foo.b);
		System.out.println(foo.c);
		System.out.println(foo.d);
		//System.out.println(foo.a); //私有访问只能在类内部
	}
}
class Foo{
	//类内，包类，父类，子类
	public int b=2;   //all
	protected int c=3;  //类内，包内，父类，子类之间
  int d = 4; //友好访问，类内，包内
	private int a=1;  //类内
}
